home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / CGIPERL / MACPERL / MSRCE418.HQX / Perl Source ƒ / Perl / MacPerl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-23  |  2.1 KB  |  67 lines

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Perl for the Macintosh
  3. File        :    MacPerl.h        -    Interface to users of the Perl kernel
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPMain.c,v $
  12. *********************************************************************/
  13.  
  14. #ifndef __MACPERL__
  15. #define __MACPERL__
  16.  
  17. #include <StdLib.h>
  18. #include <Events.h>
  19. #include <time.h>
  20.  
  21. #ifndef MP_EXT
  22. #define MP_EXT extern
  23. #define MP_INIT(x)
  24. #endif
  25.  
  26. int                 run_perl(int, char **, char **);
  27. void                 reenter();
  28.  
  29. MP_EXT Handle    gPerlReply                                        MP_INIT(nil);
  30. MP_EXT int        gPerlQuit                                        MP_INIT(0);
  31. MP_EXT char *     gDebugLogName                                    MP_INIT(0);
  32. MP_EXT short     gAppFile;
  33. MP_EXT short    gAppVol                                            MP_INIT(0);
  34. MP_EXT long        gAppDir                                            MP_INIT(0);
  35. MP_EXT short     gPrefsFile;
  36. MP_EXT Handle    gSacrificialGoat                                 MP_INIT((Handle) -1);
  37. MP_EXT Boolean    gAlwaysExtract                                    MP_INIT(false);
  38. MP_EXT void  (*gExit)(int)                                        MP_INIT(exit);
  39. MP_EXT int   (*gAtExit)(void (*func)(void))                 MP_INIT(atexit);
  40. MP_EXT char *(*gGetEnv)(const char * name)                 MP_INIT(getenv);
  41. MP_EXT char     gPseudoFileName[256];
  42. MP_EXT FSSpec    gFirstErrorFile;
  43. MP_EXT long        gFirstErrorLine                                MP_INIT(-1);
  44. MP_EXT Boolean    gSyntaxError;
  45. MP_EXT void  (*gHandleEvent)(EventRecord * ev)            MP_INIT(nil);
  46. MP_EXT clock_t    gStartClock;
  47. #if defined(powerc) || defined(__powerc)
  48. MP_EXT struct QDGlobals qd;
  49. MP_EXT void *(*gCAlloc)(size_t nmemb, size_t size)        MP_INIT(calloc);
  50. MP_EXT void  (*gFree)(void *ptr)                                MP_INIT(free);
  51. MP_EXT void *(*gMalloc)(size_t size)                        MP_INIT(malloc);
  52. MP_EXT void *(*gRealloc)(void *ptr, size_t size)        MP_INIT(realloc);
  53. #endif
  54.  
  55. #if !defined(ORIGINAL_WRAPPER)
  56. #define exit(status)         gExit(status)
  57. #define atexit(proc)         gAtExit(proc)
  58. #define getenv(name)         gGetEnv(name)
  59. #if defined(powerc) || defined(__powerc)
  60. #define calloc(nmemb,size) gCAlloc(nmemb,size)
  61. #define free(ptr)             gFree(ptr)
  62. #define malloc(size)         gMalloc(size)
  63. #define realloc(ptr,size)     gRealloc(ptr,size)
  64. #endif
  65. #endif
  66.  
  67. #endif